#pragma once
#include <cocos2d.h>
#include "pugixml.hpp"
#include "Weapon.h"

using namespace pugi;
USING_NS_CC;

class WeaponFactory : public CCObject
{
public:
	WeaponFactory(void);
	~WeaponFactory(void);

	virtual void parseXml(xml_node node);
	virtual Weapon* createWeapon();
	virtual bool init();

	CC_SYNTHESIZE_RETAIN(CCString*, _id, Id);
	CC_SYNTHESIZE(float, _timeDelay, TimeDelay);
	CC_SYNTHESIZE_RETAIN(CCArray*, _bulletData, BulletData);
	CC_SYNTHESIZE_RETAIN(CCDictionary*, _extraData, ExtraData);

	CREATE_FUNC(WeaponFactory);
};

